import { describe, expect, it } from 'vitest';

import { getLocalStorage, removeLocalStorage, setLocalStorage } from '@/common/services/storage';

describe('storage functions', () => {
  it('should add and remove item from localstorage', () => {
    const key = 'key';
    const value = 'value';
    setLocalStorage(key, value);
    expect(getLocalStorage(key)).toEqual(value);
    removeLocalStorage(key);
    expect(getLocalStorage(key)).toBeNull();
  });
});
